<template>
    <slot></slot>
</template>
<script setup>
import { onErrorCaptured } from "vue"

onErrorCaptured((err, instance, info) => {
    console.log('error---', err.toString())
    console.log('instance---', instance)
    console.log('info---', info)
    if (true) {
        // alert('页面出错了,1001,但是阻止了错误的传播')
        //阻止错误继续向上传播
        return false
    } else {
        return true 
    }
})
</script>

<script>
export default {
    name: "Error"
}
</script>
